package com.qys.livesMall.shop.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qys.livesMall.app.user.model.dto.sys.SysHomeStatisticsDTO;
import com.qys.livesMall.framework.mapper.QysBaseMapper;
import com.qys.livesMall.shop.modal.dto.shop.rw.EveryDayData;
import com.qys.livesMall.shop.modal.dto.shop.rw.ShopRwSearch;
import com.qys.livesMall.shop.modal.dto.shop.rwnew.ShopWlSearch;
import com.qys.livesMall.shop.modal.dto.shop.rwnew.ShopRechargeSearch;
import com.qys.livesMall.shop.modal.entity.H2ShopRechargeWithdrawal;
import com.qys.livesMall.shop.modal.vo.ShopDailyDataVO;
import com.qys.livesMall.shop.modal.vo.ShopRechargeWithdrawalVO;
import com.qys.livesMall.shop.modal.vo.UserAgentInfoVO;
import com.qys.livesMall.shop.modal.vo.rw.RechargeVO;
import com.qys.livesMall.shop.modal.vo.ShopWithdrawalsStatisticsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 店铺充值提现表 Mapper 接口
 * </p>
 *
 * @author
 * @since 2023-06-06
 */
@Mapper
public interface H2ShopRechargeWithdrawalMapper extends QysBaseMapper<H2ShopRechargeWithdrawal, ShopRwSearch> {

    BigDecimal getAuditWithdrawal(@Param("dto") SysHomeStatisticsDTO dto);

    BigDecimal getInitiateWithdrawal(Integer userSysType);

    ShopDailyDataVO getShopRechargeWithdrawalData(@Param("time") String time,@Param("type") Integer type);
    Page<RechargeVO> getShopRechargeList(@Param("page") Page<RechargeVO> page, @Param("reSearch") ShopRechargeSearch reSearch);
    Page<ShopWithdrawalsStatisticsVO> withdrawalsPage(@Param("page") Page<ShopWithdrawalsStatisticsVO> page, @Param("rwSearch") ShopWlSearch rwSearch);
    Map getTotalRe(@Param("shopId")Long shopId);
    Map getTotalWl(@Param("shopId")Long shopId);
    BigDecimal getTotalWaitWl(@Param("shopId")Long shopId);
    List<EveryDayData> getEveryDayRwData(@Param("shopId")Long shopId);

    List<H2ShopRechargeWithdrawal> getYesterdayRwDate(Integer userSysType);
    List<H2ShopRechargeWithdrawal> getYesterdayRwDate();

    LocalDateTime getFirstRechargeDate(@Param("shopId")Long shopId);
    BigDecimal getSecondTimeRechargeAmount(@Param("shopId")Long shopId);

    BigDecimal getWaitWithdrawalAmount(@Param("shopId")Long shopId);

}
